public class P1_Tryexcpt{
	public static void main(String args[]){
		
		int arr[] = new int[4];
		try{
			System.out.println(arr[m()]);//ArrayIndexOutOfBoundsException
			System.out.println(1 / 0);
		}
		catch (ArrayIndexOutOfBoundsException e)
		{ System.out.println(e); }
		catch (ArithmeticException e)//
		{ System.out.println(e); }

		//finally { System.out.println("This is finally"); }
	}

	static int m(){
		return 4;
	}
}